<html
    xmlns="http://www.w3.org/1999/xhtml"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:p="http://primefaces.org/ui">

    <ui:composition template="layout.xhtml">
        <ui:define name="title">
            Pesquisar Tipo de Registro/Averbação
        </ui:define>

        <ui:define name="content">
            <h:form id="pesquisarSeloForm">

                <p:messages id="seloPesquisarMessages" autoUpdate="true" />

                <div class="actions">
                    <div id="buttons">
                        <p:button value="Criar Tipo de Registro/Averbação" outcome="criarTipoAtoImovel.xhtml"
                                  icon="ui-icon-plus" styleClass="ui-priority-primary">
                        </p:button>
                    </div>
                </div>                 
                
                <f:validateBean disabled="true">

                    <p:fieldset legend="Dados">                    

                        <div class="row">
                            <div class="column1">
                                <p:outputLabel value="Tipo" for="tipoMoedaSelectOneMenu" />
                            </div>
                            <div class="column3">
                                <p:selectOneMenu id="tipoMoedaSelectOneMenu" value="#{ managerPesquisarTipoAtoImovel.tipoAtoImovel.atoImovel }">
                                    <f:selectItems value="#{ enums.atosImovel() }" />
                                </p:selectOneMenu>
                            </div>

                            <div class="column2">
                                <p:outputLabel value="Descrição" for="descricaoInputText" />
                            </div>
                            <div class="column5">
                                <p:inputText id="descricaoInputText" value="#{ managerPesquisarTipoAtoImovel.tipoAtoImovel.descricao }" />
                            </div>
                        </div>

                    </p:fieldset>

                </f:validateBean>

                <div class="command">
                    <p:commandButton
                        id="pesquisarcommandButton" value="Pesquisar" icon="ui-icon-search"
                        styleClass="ui-priority-primary" oncomplete="widthFix();"
                        update="@form" actionListener="#{ managerPesquisarTipoAtoImovel.pesquisar() }" />
                    <p:commandButton value="Limpar" icon="ui-icon-close" oncomplete="widthFix();"
                                     update="@form" actionListener="#{ managerPesquisarTipoAtoImovel.limpar() }" />                 
                </div>                

                <p:dataTable styleClass="column12" id="imoveisDataTable" var="tipoAto"
                             value="#{ managerPesquisarTipoAtoImovel.tiposAto }"
                             rows="10" paginator="true" paginatorPosition="bottom" emptyMessage="Nenhum Imóvel encontrada">
                    <p:column width="5%" headerText="Opções">
                        <div class="options1">
                            <p:button
                                title="Visualizar" href="visualizarTipoAtoImovel.xhtml?tipoAtoImovelId=#{ tipoAto.id }"
                                icon="ui-icon-search" />

                        </div>
                    </p:column>                  

                    <p:column headerText="Tipo" width="45%">
                        <h:outputText value="#{ tipoAto.atoImovel.nome }" />
                    </p:column>

                    <p:column headerText="Descrição" width="50%">
                        <h:outputText value="#{ tipoAto.descricao }" />
                    </p:column>

                </p:dataTable>

            </h:form>
        </ui:define>
    </ui:composition>

</html>
